import { Constant } from './_utils';

const { ApiPrefix } = Constant;

const database = [
    {
        id: '1',
        icon: 'dashboard',
        name: 'Dashboard',
        zh: {
            name: '数据展示',
        },
        route: '/dashboard',
    },
    {
        id: '2',
        breadcrumbParentId: '1',
        name: 'Users',
        zh: {
            name: '用户管理',
        },
        icon: 'user',
        route: '/user',
    },
    {
        id: '7',
        breadcrumbParentId: '1',
        name: 'Posts',
        zh: {
            name: '店铺管理',
        },
        icon: 'shopping-cart',
        route: '/post',
    },
    {
        id: '18',
        breadcrumbParentId: '1',
        name: 'Posts',
        zh: {
            name: '订单管理',
        },
        icon: 'shopping-cart',
        route: '/post',
    },
    {
        id: '21',
        menuParentId: '-1',
        breadcrumbParentId: '2',
        name: 'User Detail',
        zh: {
            name: '用户详情',
        },
        route: '/user/:id',
    },
    {
        id: '3',
        breadcrumbParentId: '1',
        name: 'Request',
        zh: {
            name: '权限管理',
        },
        icon: 'api',
        route: '/request',
    },
    {
        id: '4',
        breadcrumbParentId: '1',
        name: 'UI Element',
        zh: {
            name: '发布管理',
        },
        icon: 'camera-o',
    },
    {
        id: '45',
        breadcrumbParentId: '4',
        menuParentId: '4',
        name: '发布管理',
        zh: {
            name: '发布编辑',
        },
        icon: 'edit',
        route: '/editor',
    },
    {
        id: '5',
        breadcrumbParentId: '1',
        name: 'Charts',
        zh: {
            name: '审核管理',
        },
        icon: 'code-o',
    },
    {
        id: '51',
        breadcrumbParentId: '5',
        menuParentId: '5',
        name: 'ECharts',
        zh: {
            name: '发布动态审核',
        },
        icon: 'line-chart',
        route: '/chart/ECharts',
    },
    {
        id: '52',
        breadcrumbParentId: '5',
        menuParentId: '5',
        name: 'HighCharts',
        zh: {
            name: '用户认证管理',
        },
        icon: 'bar-chart',
        route: '/chart/highCharts',
    },
];

module.exports = {
    [`GET ${ApiPrefix}/routes`](req, res) {
        res.status(200).json(database);
    },
};
